﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
using CameraHandle = System.Int32;
 
using System.IO;
using System.Threading;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Emgu.CV;
using System.Drawing;

namespace WinCoreV3Run
{
    public class AsyncSaveImage
    {
        MyDNN dnn;
        int errTimes = 0;
     

 


     
        public  AsyncSaveImage()
        {

         
 
        }
        public int Initialize()
        {
            dnn = new MyDNN();
            if (dnn.Init_CNN(MyParam.svmXml) == -1)
            {
                MessageBox.Show("dnn error");
                return -1;
            }
            return 1;
        }

        public TestResult TestImage(Mat bigSrc)
        {
            Mat test = bigSrc; //new Mat(bigSrc, new System.Drawing.Rectangle(MyParam.cutX, MyParam.cutY, MyParam.cutWidth, MyParam.cutHeight));
            TestResult tesulte = dnn.Test_Img(test);
            System.Console.WriteLine(tesulte.toString());
            return tesulte;
          
        }
        

        

    }
}
